using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Text.RegularExpressions;
using Castle.MonoRail.Framework;
using DotNet_Common;
using manage.Models;


namespace manage.Controllers
{
    public class OtherController : SmartDispatcherController
    {


        /// <summary>
        /// cailist
        /// </summary>
        public void cailist()
        {

            DbExecuter db = new DbExecuter();

            string sql = "";

            sql = "select id,title from caiji_more where title<>'' and isread=0 order by id desc";

            DataTable re = db.Exec(sql);

            PropertyBag["data"] = re.Rows;
        }



        /// <summary>
        /// 
        /// </summary>
        public void cai()
        {
            DbExecuter db = new DbExecuter();

            string sql = "";

            sql = "select * from caiji_more where id=" + Query["id"];

            DataTable re = db.Exec(sql);

            sql = "update caiji_more set isread=1 where id=" + Query["id"];
            db.ExecNo(sql);

            PropertyBag["data"] = re.Rows[0];
        }



    }
}